<?php 

class QuestionController extends Controller{
	private $db;
	public function __init()
	{
		$this->db=K('Question');
	}
	//存储问题
	public function ask()
	{
		if (!isset($_SESSION['uid'])) {
			$this->error('请登录后再提问');
			return false;
		}
		if ($this->db->addQuestion()) {
			$this->success('提问成功',__WEB__);
		}else{
			$this->error($this->db->error);
		}
		
	}
}


 ?>